package attendance.gencode;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

import io.vertx.core.json.JsonObject;

public class Config {
	public static JsonObject getDbConfig() throws Exception {
		String root = System.getProperty("user.dir");
		Path path = Paths.get(root, "data", "config.json");
		byte[] bs;
		bs = Files.readAllBytes(path);
		JsonObject config = new JsonObject(new String(bs));
		return config.getJsonObject("db");
	}
}
